package s2elinshu;

public class J12Retangle {

	public static void main(String[] args) {
		Retangle a = new Retangle();
		a.str = "red";
		a.width = 4;
		a.height = 5;
		System.out.println(a.str);
		System.out.println(a.getArea());
		System.out.println(a.getPerim());

	}  // main 닫음
} // J12Retangle 닫음

class Retangle{
	String str;
	int width;
	int height;
	double area;
	double perim;
	public double getArea(){
		return(width * height);
	}
	public double getPerim(){
		return(2 * (width + height));
	}
}
